package com.bjpowernode.security04mysql.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 
 * @TableName sys_role_menu
 */
@TableName(value ="sys_role_menu")
public class SysRoleMenu {
    /**
     * 菜单表的编号
     */
    @TableId
    private Integer mid;

    /**
     * 角色表的编号
     */

    private Integer rid;

    /**
     * 菜单表的编号
     */
    public Integer getMid() {
        return mid;
    }

    /**
     * 菜单表的编号
     */
    public void setMid(Integer mid) {
        this.mid = mid;
    }

    /**
     * 角色表的编号
     */
    public Integer getRid() {
        return rid;
    }

    /**
     * 角色表的编号
     */
    public void setRid(Integer rid) {
        this.rid = rid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRoleMenu other = (SysRoleMenu) that;
        return (this.getMid() == null ? other.getMid() == null : this.getMid().equals(other.getMid()))
            && (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMid() == null) ? 0 : getMid().hashCode());
        result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", mid=").append(mid);
        sb.append(", rid=").append(rid);
        sb.append("]");
        return sb.toString();
    }
}